From 14d297bd587064f94b787abc48c2185f17292f2f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Thu, 30 Dec 2021 15:30:51 +0100 Subject: [PATCH] fstab entries for btrfs target --- modules/default.mk | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/modules/default.mk b/modules/default.mk index ceb91ff..bb4f432 100644 --- a/modules/default.mk +++ b/modules/default.mk @@ -139,3 +139,27 @@ ifdef wifi printf ' wireless-essid "%s"\n' "$$wifi" >>$@ endif endif + +.PHONY: _fstab + +ifdef _fstab + _config: ${CFGROOT}/etc/fstab + export _fstab + +else + ifdef fsuuid + define _fstab := +UUID=${fsuuid} / btrfs auto,rw,subvol=${release} 0 0 +UUID=${fsuuid} /home btrfs auto,nofail,rw,subvol=home 0 0 +UUID=${fsuuid} /mnt/fsroot btrfs auto,nofail,rw 0 0 +LABEL=SWAP swap swap auto,nofail,sw 0 0 +LABEL=EFIBOOT /boot/efi vfat auto,nofail,ro 0 0 +endef + _config: ${CFGROOT}/etc/fstab + export _fstab + + endif +endif + +${CFGROOT}/etc/fstab: ${CFGROOT} + printf '%s' "$${_fstab}" >"$@" -- 2.39.2